//
//  MyUIViewController.m
//  MoCard
//
//  Created by 水石 温 on 11-10-14.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "MyUIViewController.h"


@implementation MyUIViewController
#pragma mark - View lifecycle

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"iphone5_bg.png"]];
//    //self.navigationController.navigationBar.tintColor = RGB(8, 19, 90, 1);

//    self.view.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
//    float fasd  = SCREEN_HEIGHT;
//    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
//    //imageView.backgroundColor = [UIColor redColor];
//     imageView.image = [IMG(@"background.jpg") stretchableImageWithLeftCapWidth:160 topCapHeight:460];
//     [self.view addSubview:imageView];
    
    // 不支持 iOS4
    UINavigationBar *navBar = [self.navigationController navigationBar];
    if ([navBar respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)]) {
        if (IOS7_OR_LATER) {
            [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
            [[UINavigationBar appearance] setTitleTextAttributes:@{UITextAttributeTextColor : [UIColor whiteColor]}];
            [[UINavigationBar appearance] setBarTintColor:[UIColor whiteColor]];
//            [[UINavigationBar appearance] setTitleTextAttributes:@{UITextAttributeTextColor : [UIColor whiteColor]}];
//            [[UINavigationBar appearance] setBarTintColor:RGB(0, 194, 114, 1)];
            [navBar setBackgroundImage:[UIImage imageNamed:@"public_nav_bg.png"] forBarMetrics:UIBarMetricsDefault];
//            [navBar setBackgroundImage:[UIImage imageNamed:@"public_nav_bg_number.png"] forBarMetrics:UIBarMetricsDefaultPrompt];
        }else{
            [navBar setBackgroundImage:IMG(@"public_nav_bg44.png") forBarMetrics:0];
        }
    }
    [Global SetSubViewExternNone:self];
    
//    UIBarButtonItem *leftItem = [UIBarButtonItem backImageBarButtonItem:[UIImage imageNamed:@"back.png"] target:self action:@selector(cancel)];
//    self.navigationItem.leftBarButtonItem = leftItem;
    
}
-(void)initTabview{
    tabview = [[UITableView alloc] init];
    tabview.separatorColor = [UIColor whiteColor];
    tabview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"iphone5_bg.png"]];
    tabview.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-64);
    [self.view addSubview:tabview];
}
//-(void)cancel{
//    if (!self.navigationController.presentedViewController) {
//        [self.navigationController popViewControllerAnimated:YES];
//    }
//}

-(void)dealloc {
}


@end
